module.exports = {
  apps: [
    {
      name: 'certeasy-api',
      script: './bin/apps/api-gateway/main.js',
      watch: './bin/apps/api-gateway',
      instances: 'max',
      ignore_watch: ['.certeasy', 'billing', 'node_modules', 'logs'],
      error_file: './logs/certeasy-api-err.log',
      out_file: './logs/certeasy-api-out.log',
      merge_logs: true,
      log_date_format: 'YYYY-MM-DD HH:mm:ss',
      env: {
        COMMON_VARIABLE: 'true',
      },
      env_production: {
        NODE_ENV: 'production',
      },
      env_staging: {
        NODE_ENV: 'staging',
      },
      env_development: {
        NODE_ENV: 'development',
      },
    },
    {
      name: 'certeasy-processor',
      script: './bin/apps/processor/main.js',
      watch: './bin/apps/processor',
      instances: '1',
      ignore_watch: ['.certeasy', 'billing', 'node_modules', 'logs'],
      error_file: './logs/processor-err.log',
      out_file: './logs/processor-out.log',
      merge_logs: true,
      log_date_format: 'YYYY-MM-DD HH:mm:ss',
      env: {
        COMMON_VARIABLE: 'true',
      },
      env_production: {
        NODE_ENV: 'production',
      },
      env_staging: {
        NODE_ENV: 'staging',
      },
      env_development: {
        NODE_ENV: 'development',
      },
    },
  ],
};
